package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.YxxUtilityPaymentsMapper;
import com.ruoyi.system.domain.YxxUtilityPayments;
import com.ruoyi.system.service.IYxxUtilityPaymentsService;

/**
 * 水电费缴费记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-10
 */
@Service
public class YxxUtilityPaymentsServiceImpl implements IYxxUtilityPaymentsService 
{
    @Autowired
    private YxxUtilityPaymentsMapper yxxUtilityPaymentsMapper;

    /**
     * 查询水电费缴费记录
     * 
     * @param id 水电费缴费记录主键
     * @return 水电费缴费记录
     */
    @Override
    public YxxUtilityPayments selectYxxUtilityPaymentsById(Long id)
    {
        return yxxUtilityPaymentsMapper.selectYxxUtilityPaymentsById(id);
    }

    /**
     * 查询水电费缴费记录列表
     * 
     * @param yxxUtilityPayments 水电费缴费记录
     * @return 水电费缴费记录
     */
    @Override
    public List<YxxUtilityPayments> selectYxxUtilityPaymentsList(YxxUtilityPayments yxxUtilityPayments)
    {
        return yxxUtilityPaymentsMapper.selectYxxUtilityPaymentsList(yxxUtilityPayments);
    }

    /**
     * 新增水电费缴费记录
     * 
     * @param yxxUtilityPayments 水电费缴费记录
     * @return 结果
     */
    @Override
    public int insertYxxUtilityPayments(YxxUtilityPayments yxxUtilityPayments)
    {
        yxxUtilityPayments.setCreateTime(DateUtils.getNowDate());
        return yxxUtilityPaymentsMapper.insertYxxUtilityPayments(yxxUtilityPayments);
    }

    /**
     * 修改水电费缴费记录
     * 
     * @param yxxUtilityPayments 水电费缴费记录
     * @return 结果
     */
    @Override
    public int updateYxxUtilityPayments(YxxUtilityPayments yxxUtilityPayments)
    {
        yxxUtilityPayments.setUpdateTime(DateUtils.getNowDate());
        return yxxUtilityPaymentsMapper.updateYxxUtilityPayments(yxxUtilityPayments);
    }

    /**
     * 批量删除水电费缴费记录
     * 
     * @param ids 需要删除的水电费缴费记录主键
     * @return 结果
     */
    @Override
    public int deleteYxxUtilityPaymentsByIds(Long[] ids)
    {
        return yxxUtilityPaymentsMapper.deleteYxxUtilityPaymentsByIds(ids);
    }

    /**
     * 删除水电费缴费记录信息
     * 
     * @param id 水电费缴费记录主键
     * @return 结果
     */
    @Override
    public int deleteYxxUtilityPaymentsById(Long id)
    {
        return yxxUtilityPaymentsMapper.deleteYxxUtilityPaymentsById(id);
    }
}
